package com.wwj.gulimall.product;

import com.wwj.gulimall.product.entity.BrandEntity;
import com.wwj.gulimall.product.service.BrandService;
import com.wwj.gulimall.product.service.CategoryService;
import com.wwj.gulimall.product.service.impl.BrandServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.io.File;

@SpringBootTest
@Slf4j
@RunWith(SpringRunner.class)
public class FulimallProductApplication {

    @Autowired
    BrandService brandService;


    @Autowired
    CategoryService categoryService;


    @Test
    public void contextLoads(){

        BrandEntity brandEntity = new BrandEntity();
        brandEntity.setName("华为");
        brandService.save(brandEntity);
        log.info("保存成功");

    }
}
